
var GameData = require('../module/gameData')();
cc.Class({
    extends: cc.Component,

    properties: {
      num:cc.Label,
    },

    onLoad () {

    },
    load(){
        // this.init(50)
    },
    init(num){
        var that=this;
        this.num.string="+"+num;
        this.node.opacity=0;
        this.node.runAction(
            cc.sequence(
                cc.spawn(
                    cc.moveBy(0.3,0,-5),
                    cc.fadeIn(0.3),
                ),
                cc.delayTime(0.5),
                cc.spawn(
                    cc.moveBy(0.6,0,10),
                    cc.fadeOut(0.6),
                ),
                cc.callFunc(function () {
                    GameData.addcoinAct.put(that.node);
                })
            )
        )
    },

    start () {

    },

    // update (dt) {},
});
